package dawnland03.model.action.impl;

import dawnland03.model.action.ActionImpl;
import dawnland03.model.action.ActionType;
import dawnland03.model.action.handler.ActionHandler;
import dawnland03.model.action.parameter.ActionOutputParam;
import dawnland03.model.entity.Entity;

/**
 * User: Petru Obreja (obrejap@yahoo.com)
 * Date: May 9, 2010
 * Time: 9:59:13 PM
 */
public class InitAction extends ActionImpl {
    InitAction(Entity owner, long duration, ActionHandler actionHandler) {
        super(owner, ActionType.INIT, null, null, null, duration, actionHandler);
    }

    @Override
    protected void endAction() {
       //wait for others to start
        owner.getTeam().signalTeamMemberIsReady();
        outputParameters.addOutputParamValue(ActionOutputParam.COMPLETED, true);
        super.endAction();
    }
}
